<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
</html>
<script>
    //遍历对象中的成员 for(var 变量 in 对象){    }
    var obj={name:'小刚',age:'18',sex:'男'}
    for(var k in obj){
        console.log(k);
        console.log(obj[k]);
    }
</script>